import 'es6-shim'
import { createSSRApp } from "vue";
import App from "./App.vue";
import routeInterceptor from './utils/navigator.interceptor'
import navigator from './utils/navigator'
import pages from './pages.json'

export function createApp() {
  navigator.setPages(pages)
  navigator
  .setAppHomePath('/pages/home/index')
  // .setAppWebviewPath("/pso/sub_package/common/webview/index")
  .setPages(pages)
  .init()
  .setInterceptors(routeInterceptor)
  .registerRouteConfig({});
  const app = createSSRApp(App);
  app.use(createPinia())
  return {
    app,
  };
}
